Conventional video compression systems such as MPEG-2 and MPEG-4 require that the encoders and decoders are synchronized. The system specifications defined by MPEG make provision for synchronizing the clocks at encoder and decoder. For historical reasons the master system clock frequency is set at 27 MHz and it is this clock that is locked at each end of a system. The parameter Program Clock Reference (PCR) is a code derived from the encoder 27 MHz clock that is inserted into a coded bit stream that enables a decoder to keep its internal clock locked to that of the encoder.
It is typical of television broadcast networks that during the video compression encoding process the variable amount of information required adequately to represent the television pictures being transmitted has to be matched to a constant available transmission capacity. Such systems are known as Constant Bit Rate (CBR) systems. The matching of input and output bit rates is achieved by means of a rate buffer into which the compressed video is placed prior to its transmission. For a given set of coding parameters the delay though this rate buffer will vary and, in conventional PCR insertion methods this will affect the PCR frequency and regularity.
More advanced systems use a multiplex of a plurality of channels and statistical multiplexing to combine the plurality of channels into a multiplex having a substantially constant bit rate. Statistical multiplexing helps to avoid the quality loss and inefficient use of available output capacity present in fixed share systems. Statistical multiplexing allows a group of encoders to share a fixed total common bit rate, but instead of allocating a fixed bit rate to each encoder, a bit rate controller dynamically allocates different bit rates to each encoder dependant upon the instantaneous bit rate demand of the respective input video data streams. Such a system allows each channel to have a variable bit rate (VBR) but these still require that the PCRs are inserted appropriately according to specification.
The MPEG and DVB system specifications are defined in: ISO/IEC 13818-1, “Generic Coding of Moving Pictures and Associated Audio Systems”; and DVB/ETSI TS 102 154, “Implementation guidelines for the use of video and audio coding in contribution and primary distribution applications based on the MPEG-2 transport stream”. Both of these documents are incorporated herein by reference.
According to the MPEG and DVB system specifications the PCR needs to be inserted into an MPEG transport stream at regular intervals with a defined maximum time lapse between insertions. Compliant decoders are designed to work correctly within the limits set by this timing arrangement. Although practical decoders can be tolerant to variations in the rate and positioning of the PCR, to accommodate all decoders it is appropriate that the PCR is regular and occurs at a minimum frequency (or maximum time interval). In particular it is important that any two PCRs are not placed too close together even if the average rate meets the minimum requirement.
The MPEG/DVB Transport Stream (TS) has a defined packet based structure the syntax of which has provision to carry important system data, such as the PCR, as well as the encoded video, audio and other service elements. It is efficient to insert PCRs into adaptation fields in the packet headers provided by this syntax.
Traditionally, the construction of packetized MPEG TS has been done after the rate buffer where the output bit rate is typically constant, achieved because the rate buffer evens out the variations in encoder output. In such a system a simple method of PCR insertion is possible whereby the PCRs are inserted at regular time intervals under the control of a timer set at the required rate. This scheme has been adequate because generally the syntax of the TS consumes a small part of the total output bit rate. This has meant that historically this method of PCR insertion has not been a critical element in practical system design—where the ratio of payload to system syntax is a consideration.
However, as coding performance has increased and reductions in bit rate for a given video quality have been achieved, the proportion of the TS taken up by system syntax has steadily increased. Worthwhile gains can be made in performance by managing the PCR insertion process more carefully than before.
Typically, TS packetization is performed after a rate buffer, so that the packetization is performed on the elementary stream (ES) produced by the encoder after the rate of the ES has been smoothed. However, improvements in the efficiency of bandwidth utilization can be made if TS packetization is performed immediately after encoding, so before the rate buffer rather than after it.
Where TS packetization is performed after a rate buffer, the output bit rate from each packetizer can vary from the bit rate allocated to it by the bit rate controller by +/−3%. Accordingly, when the multiplexer allocates bandwidth to each stream in such a system, the multiplexer must leave a bandwidth margin to absorb this fluctuation from each stream. This margin is wasteful and inefficient.
Packetization pre-rate buffer is more efficient because the output bit rate from the rate buffer is exactly equal to the bit rate allocated to that stream by a bit rate controller. Therefore when a multiplexer has to aggregate all components from multiple streams to form a single multiplex, the sum equals an expected value with no variation. Because of this exactness, the bit rate controller can allocate all available bandwidth to the streams, without leaving a margin for variation, thus increasing bandwidth efficiency and having a positive impact on picture quality.
However, when TS packetization occurs before the rate buffer the process for inserting PCRs is much more complicated. This is because the PCR insertion must now take account of the delay of the encoded video data through the rate buffer.
Market demands require that the next generation of video compression encoders must take advantage of any means of improving transmission efficiency, in particular PCR insertion.
The present application provides a method and apparatus for improved PCR insertion.